package demo7;


import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Text {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext a =
                new AnnotationConfigApplicationContext(SpringConfig.class);
        master bean = a.getBean(master.class);
        bean.hello();

        ApplicationContext aa= new AnnotationConfigApplicationContext(SpringConfig.class);
        master bean1 = aa.getBean(master.class);
        dd bean2 = aa.getBean(dd.class);
        bean2.dd();
        bean1.hello();

    }
}
